/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package ucm.Controller;

import ucm.model.UCLogin_Model;
import ucm.*;

public class UCLogin_Controller {

    private String name;
    private String password;

    public UCLogin_Controller(String name, String password) {
        this.name = name;
        this.password = password;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public boolean run() {
        UCLogin_Model mo = new UCLogin_Model(name, password);
        if (mo.runLogin()) {
            return true;
        } else {
            return false;
        }
    }

    public boolean runadmin() {
        UCLogin_Model mo = new UCLogin_Model(name, password);
        if (mo.runLoginAdmin()) {
            return true;
        } else {
            return false;
        }
    }
        public boolean runManager() {
        UCLogin_Model mo = new UCLogin_Model(name, password);
        if (mo.runLoginManager()) {
            return true;
        } else {
            return false;
        }
    }
}
